{% load static %}
<template  id="v_id_{{ name }}">
    <div>
            <input type="hidden" name="{{ raw_name }}" value="{{ value }}" v-model="{{ name }}">
        <el-checkbox-group v-model="{{ name }}">
            <el-checkbox v-for="item in datas" :label="item.value" :key="item.value"><span v-text="item.label"></span></el-checkbox>
        </el-checkbox-group>
    </div>
</template>
<script type="text/javascript">
    var {{ name }}_value='{{ value }}';
    var {{ name }}_choices={{ choices|safe }};
    var ttt=new Vue({el:'#v_id_{{ name }}',
        data:{
            '{{ name }}':{{ name }}_value.split(','),
            datas:[]
        },
        created:function (){
            {{ name }}_choices.forEach(item=>{
                this.datas.push({
                    value:""+item[0],
                    label:item[1],

                })
            });
        }
    });
</script>